import http from "@/api";

/**
 * @name //门禁管理
 */

// 获取员工卡类型选择列表
export const getEmpcardTypes = (params = {}) => {
  return http.get(`/lookup/empcard/types`, params, { noLoading: true });
};

// 获取人员列表
export const getEmployeeList = (params = {}) => {
  return http.post(`/employee/query`, params, { noLoading: true });
};

// 获取门禁组列表
export const getGroupEmpList = (params = {}) => {
  return http.post(`/rule-group/for-employee/query`, params, { noLoading: true });
};

// 获取门禁组列表
export const getDoorList = (params = {}) => {
  return http.post(`/door/query`, params, { noLoading: true });
};

// 获取区域选择列表
export const getAreaSelList = (params = {}) => {
  return http.get(`/lookup/areas`, params, { noLoading: true });
};

// 增加门禁组
export const addGroup = (params = {}) => {
  return http.post(`/rule-group/employee/add`, params);
};

// 增加门禁点
export const addDoor = (params = {}) => {
  return http.post(`/rule/employee/access/add`, params);
};

// 删除门禁组
export const delGroup = (params = {}) => {
  return http.post(`/rule-group/employee/delete`, params);
};

// 删除门禁点
export const delDoor = (params = {}) => {
  return http.post(`/rule/employee/access/delete`, params);
};

// 复制门禁点权限
export const copyAccess = (params = {}) => {
  return http.post(`/rule/employee/access/copy`, params);
};

// 保存远程开门权限
export const saveOpenDoorRights = (params = {}) => {
  return http.post(`/employee/open-door-right/save`, params);
};
